package interfaceGrafica;

import java.util.HashMap;

import topologia.Link;


public class AdicionarGrafo extends Acoes {

	public AdicionarGrafo(String nome) {
		this.getGraph().getModel().beginUpdate();
		Object parent = this.getGraph().getDefaultParent();
		Object v1 = this.getGraph().insertVertex(parent, null, nome, 330, 30, 100, 50);
		this.getM().put(nome, v1);
		if(topologia.containsKey(nome)){
			nome = null;
		}else{
			topologia.put(nome, new HashMap<String, Link>());
		}
		this.getGraph().getModel().endUpdate();
	}
}
